/**
 * @projectName demo-master
 * @fileName TestController.java
 * @packageName org.example.share.controller
 * @author xaoyaoyao
 * @date 2021/3/24 17:42
 * @version V1.0
 * @copyright (c) 2021, xaoyaoyao@aliyun.com All Rights Reserved.
 */
package org.example.share.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className TestController
 * @description
 * @author xaoyaoyao
 * @date 2021/3/24 17:42
 */
@RestController
@RefreshScope
public class TestController {

	@Value("${nacos.share}")
	private String share;

	@Value("${share.config1}")
	private String shareConfig1;

	@Value("${share.config2}")
	private String shareConfig2;

	@Value("${share.config3}")
	private String shareConfig3;

	@Value("${share.config4}")
	private String shareConfig4;

	@RequestMapping("/getValue")
	public String getValue() {
		return share;
	}

	@RequestMapping("/getShare1")
	public String getShare1() {
		return shareConfig1;
	}

	@RequestMapping("/getShare2")
	public String getShare2() {
		return shareConfig2;
	}

	@RequestMapping("/getShare3")
	public String getShare3() {
		return shareConfig3;
	}

	@RequestMapping("/getShare4")
	public String getShare4() {
		return shareConfig4;
	}
}
